home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / DIVERSEN / WINE02BX / FEEDMAIL.ELC < prev    next >
Text File  |  1993-03-28  |  10KB  |  115 lines

  1. ;;; compiled by jwz@thalidomide on Thu Jul  2 16:34:48 1992
  2. ;;; from file /u/jwz/emacs19/lisp/packages/feedmail.el
  3. ;;; emacs version 19.2.1 Lucid.
  4. ;;; bytecomp version 2.07; 17-jun-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (defvar feedmail-confirm-outgoing nil "\
  14. *If non-nil, gives a y-or-n confirmation prompt after prepping,
  15. before sending mail.")
  16. (defvar feedmail-nuke-bcc t "\
  17. *Non-nil means get rid of the BCC: lines from the message header
  18. text before sending the mail.  In any case, the BCC: lines do
  19. participate in the composed address list.  You probably want to keep
  20. them if you're using sendmail (see feedmail-buffer-eating-function).")
  21. (defvar feedmail-fill-to-cc t "\
  22. *Non-nil means do smart filling (line-wrapping) of TO: and CC: header
  23. lines.  If nil, the lines are left as-is.  The filling is done after
  24. mail address alias expansion.")
  25. (defvar feedmail-fill-to-cc-fill-column default-fill-column "\
  26. *Fill column used when wrapping mail TO: and CC: lines.")
  27. (defvar feedmail-nuke-empty-headers t "\
  28. *If non-nil, headers with no contents are removed from the outgoing
  29. email.  A completely empty SUBJECT: header is always removed,
  30. regardless of the setting of this variable.  The only time you would
  31. want them left in would be if you used some headers whose presence
  32. indicated something rather than their contents.")
  33. (defvar feedmail-sender-line nil "\
  34. *If nil, no SENDER: header is forced.  If non-nil and the email
  35. already has a FROM: header, a SENDER: header is forced with this as
  36. its contents.  You can probably leave this nil, but if you feel like
  37. using it, a good value would be a fully-qualified domain name form of
  38. your address.  For example, william.j.carpenter@att.com.  Don't
  39. include a trailing newline or the keyword SENDER:.  They're
  40. automatically provided.")
  41. (defvar feedmail-from-line (byte-code "└ ┴┬ ├─ ┼░ç" [user-login-name "@" system-name " (" user-full-name ")"] 6) "\
  42. *If non-nil and the email has no FROM: header, one will be forced
  43. with this as its contents. A good value would be a fully-qualified
  44. domain name form of your address.  For example, william.j.carpenter@att.com.
  45. (The default value of this variable is probably not very good, since
  46. it doesn't have a domain part.)  Don't include a trailing newline or
  47. the keyword FROM:.  They're automatically provided.")
  48. (defvar feedmail-message-id-generator nil "\
  49. *If non-nil, should be a function (called with no arguments) which
  50. will generate a unique message ID which will be inserted on a
  51. Message-ID: header.  The message ID should be the return value of the
  52. function.  Don't include trailing newline, leading space, or the
  53. keyword MESSAGE-ID.  They're automatically provided.  Do include
  54. surrounding <> brackets.  For an example of a message ID generating
  55. function, you could look at the GNUS function gnus-inews-message-id.
  56. When called, the current buffer is the prepped outgoing mail buffer
  57. (the function may inspect it, but shouldn't modify it).  If the returned
  58. value doesn't contain any non-whitespace characters, no message ID
  59. header is generated, so you could generate them conditionally,
  60. based on the contents of the mail.")
  61. (fset 'feedmail-confirm-addresses-hook-example #[nil "└ïç" [((byte-code "└    !ê┬├!?¡â─┼!ç" [display-buffer feedmail-address-buffer y-or-n-p "How do you like them apples? " error "Sending...gave up in last chance hook"] 2))] 1 "\
  62. An example of a last chance hook that shows the simple addresses
  63. and gets a confirmation.  Use as (setq feedmail-last-chance-hook
  64. 'feedmail-confirm-addresses-hook-example)."])
  65. (defvar feedmail-last-chance-hook nil "\
  66. *User's last opportunity to modify the message on its way out.  It
  67. has already had all the header prepping from the standard package.
  68. The next step after running the hook will be to push the buffer into a
  69. subprocess that mails the mail.  The hook might be interested in these
  70. buffers:  (1) feedmail-prepped-text-buffer contains the header and body
  71. of the message, ready to go;  (2) feedmail-address-buffer contains the
  72. space-separated, simplified list of addresses which is to be given to
  73. the subprocess (the hook may change them).  feedmail-error-buffer is
  74. an empty buffer intended to soak up errors for display to the user.
  75. If the hook allows interactive activity, the user should not send more
  76. mail while in the hook since some of the internal buffers will be reused.")
  77. (defvar feedmail-buffer-eating-function 'feedmail-buffer-to-binmail "\
  78. *Function used to send the prepped buffer to a subprocess.  The
  79. function's three (mandatory) arguments are: (1) the buffer containing
  80. the prepped message; (2) a buffer where errors should be directed; and
  81. (3) a string containing the space-separated list of simplified
  82. addresses.  Two popular choices for this are 'feedmail-buffer-to-binmail
  83. and 'feedmail-buffer-to-sendmail.  If you use the sendmail form, you
  84. probably want to set feedmail-nuke-bcc to nil.  If you use the binmail
  85. form, check the value of feedmail-binmail-template.")
  86. (defvar feedmail-binmail-template (byte-code "½é┴ç┬ç" [mail-interactive "/bin/mail %s" "/bin/rmail %s"] 1) "\
  87. *Command template for the subprocess which will get rid of the
  88. mail.  It can result in any command understandable by /bin/sh.  The
  89. single '%s', if present, gets replaced by the space-separated,
  90. simplified list of addressees.  Used in feedmail-buffer-to-binmail to
  91. form the shell command which will receive the contents of the prepped
  92. buffer as stdin.  If you'd like your errors to come back as mail
  93. instead of immediately in a buffer, try /bin/rmail instead of
  94. /bin/mail (this can be accomplished by keeping the default nil setting
  95. of mail-interactive).  You might also like to consult local mail
  96. experts for any other interesting command line possibilities.")
  97. (fset 'feedmail-buffer-to-binmail #[(prepped-mail-buffer mail-error-buffer simple-address-list) "èqê┴┬├ed─┼┼╟╚    \n\"»!\")ç" [prepped-mail-buffer apply call-process-region append "/bin/sh" nil mail-error-buffer "-c" format feedmail-binmail-template simple-address-list] 13 "\
  98. Function which actually calls /bin/mail as a subprocess and feeds the buffer to it."])
  99. (fset 'feedmail-buffer-to-sendmail #[(prepped-mail-buffer feedmail-error-buffer simple-address-list) "èqê┴┬├ed─┼!½â¬ü╞╟╟╔╩»╦ ╠Ü¡ä═╬ D?¡ü╨#\")ç" [prepped-mail-buffer apply call-process-region append boundp sendmail-program "/usr/lib/sendmail" nil feedmail-error-buffer "-oi" "-t" user-real-login-name "root" "-f" user-login-name mail-interactive ("-oem" "-odb")] 11 "\
  100. Function which actually calls sendmail as a subprocess and feeds the buffer to it."])
  101. (fset 'feedmail-send-it #[nil "└┬├!┬┼!┬╟!p    ╩ ╩ ═Äèqê╬ ê╧    !êdbêh╨U¼â╨cêebê╤╥╙!╒Q!ê╓╒!ê╫  ╪┘!½è½å┘e \"ê½à▄ !êebê╤▌ └#½î` W½å╓╒!ê¬l└ ▐e #êèqêebê╤▀d└#¼äαß!ê)\"½àπ !êebê╤Σ └#½àσ !êebê╤µ └#½¥'½ºèebê╤Φ └#)¼ÜΘyêΩ'╒▒ê¬Ä+½èebê∞+╒▒êebê╤φ └#½ä╓ε!êebê/½Ä╤≡ └#½å╓ε!ê¬r)1½⌐ebê╤≥ └#½ä╓ε!ê1 3ebê3½Ä⌠⌡3\"½ç÷3╒▒êè qê╬ ê)≈°!ê9½å·!½É; èqêⁿ )#¬âα²!.    ç" [t default-case-fold-search get-buffer-create " *Outgoing Email Errors*" feedmail-error-buffer " *Outgoing Email Text*" feedmail-prepped-text-buffer " *Outgoing Email Address List*" feedmail-address-buffer feedmail-raw-text-buffer nil case-fold-search end-of-headers-marker ((byte-code "└    !ê└\n!ê qê─ ┼U½å└ !ê¬ê╞ !ê╟╚!ê    qç" [kill-buffer feedmail-prepped-text-buffer feedmail-address-buffer feedmail-error-buffer buffer-size 0 display-buffer error "Sending...failed" feedmail-raw-text-buffer] 2)) erase-buffer insert-buffer-substring 10 re-search-forward "^" regexp-quote mail-header-separator "\n" replace-match point-marker fboundp expand-mail-aliases mail-aliases feedmail-fill-to-cc feedmail-fill-to-cc-function "\n\n\n*" feedmail-deduce-address-list "\\S-" error "Sending...abandoned, no addressees!" feedmail-nuke-bcc feedmail-do-bcc "^FCC:" mail-do-fcc "^FROM:" feedmail-sender-line "^SENDER:" 1 "Sender: " feedmail-from-line "From: " "^Subject:[     ]*\n" "" feedmail-nuke-empty-headers "^[A-Za-z0-9-]+:[     ]*\n" feedmail-message-id-generator "^MESSAGE-ID:[     ]*\n" feedmail-msgid-part string-match "[^     ]" "Message-ID: " run-hooks feedmail-last-chance-hook feedmail-confirm-outgoing feedmail-one-last-look feedmail-buffer-eating-function buffer-string "Sending...abandoned"] 4])
  102. (fset 'feedmail-do-bcc #[(header-end) "└èebê┬├ └#¡ÿ┼ö╞yê`|ê╟╚!½l` W½g╔╩!ê¬p*ç" [t case-fold-search re-search-forward "^BCC:" header-end 0 1 looking-at "^[     ].*\n" replace-match ""] 4 "\
  103. Delete BCC: and their continuation lines from the header area.
  104. There may be multiple BCC: lines, and each may have arbitrarily
  105. many continuation lines."])
  106. (fset 'feedmail-fill-to-cc-function #[(header-end) "└┴\n├ëèebê╔╩ └#¡╓╠ö═yê╬╧!½Å` W½ë╨╤!ê═yê¬l╥ ╙ ╘╒└%ê╙ ╓╘└%ê╫ \"ê╙ ╘╓└%ê╙ ╒╘└%êèbê╔╪ └#½å╨┘!ê¬s)¬\".ç" [t "    " feedmail-fill-to-cc-fill-column nil this-line-end this-line fill-column fill-prefix case-fold-search re-search-forward "^\\(TO:\\|CC:\\)" header-end 0 1 looking-at "^[     ]+" replace-match " " point-marker subst-char-in-region 32 2 44 fill-region-as-paragraph "\\([^,]\\)\n    [ ]*" "\\1,\n    "] 6 "\
  107. Smart filling of TO: and CC: headers.  The filling tries to avoid
  108. splitting lines except at commas.  This avoids, in particular,
  109. splitting within parenthesized comments in addresses."])
  110. (fset 'feedmail-deduce-address-list #[(feedmail-text-buffer header-start header-end) "└┴!ê┬├─ë─Äè    qê╩ ê╦ #êebê╧╨┬#½¼╤├!ê╥ö╙yê╘╒!½ï`W½à╙yê¬p╓ ╫╪{!Q¬L╩ ê┘!ê┌ed█▄┬%ê┌ed▌▄┬%ê┌ed▐▄┬%êebê╧▀┬#¡å╤╫!ê¬r.ç" [require mail-utils t "" nil this-line-end this-line simple-address-list case-fold-search feedmail-address-buffer erase-buffer insert-buffer-substring feedmail-text-buffer header-start header-end re-search-forward "^\\(TO:\\|CC:\\|BCC:\\)" replace-match 0 1 looking-at "^[     ]+" point-marker " " mail-strip-quoted-names insert-string subst-char-in-region 10 32 44 9 "[     ]+"] 6 "\
  111. Get address list suitable for command line use on simple /bin/mail."])
  112. (fset 'feedmail-one-last-look #[(feedmail-prepped-text-buffer) "è└ï)ç" [((byte-code "└    !ê┬├!ç" [switch-to-buffer feedmail-prepped-text-buffer y-or-n-p "Send this email? "] 2))] 1 "\
  113. Offer the user one last chance to give it up."])
  114. (provide 'feedmail)
  115.